import request from '@/utils/request';

//添加商品收藏
export const favoriteCreate = (params: any) => {
    return request({
        url: '/app-api/product/favorite/create',
        method: 'POST',
        body: params,
        hideLoading: true,
    });
};
//获得商品收藏分页
export const favoritePage = (params: any) => {
    return request({
        url: '/app-api/product/favorite/page',
        method: 'POST',
        body: params,
        hideLoading: false,
    });
};
//检查是否收藏过商品
export const favoriteExits = (params: any) => {
    return request({
        url: '/app-api/product/favorite/exits',
        method: 'GET',
        body: params,
        hideLoading: false,
    });
};

//取消单个商品收藏
export const favoriteDelete = (params: any) => {
    return request({
        url: `/app-api/product/favorite/delete`,
        method: 'DELETE',
        body: params,
        hideLoading: true,
    });
};
